this.connect('next', () => {
this.updateSensitivity(false);
this.startSpinning();
- if (this._queryingService) {
+ if (this._queryingService)
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
- } else {
+ else
this._preemptiveAnswer = this._entry.text;
- }
});
this.connect('destroy', this._onDestroy.bind(this));
}
cancel() {
- if (this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) {
+ if (this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED)
return;
- }
+
this.reset();
this.emit('cancelled');
}
for (let i = 0; i < tasks.length; i++) {
let task;
- if (tasks[i] instanceof Task) {
+ if (tasks[i] instanceof Task)
task = tasks[i];
- } else if (typeof tasks[i] == 'function') {
+ else if (typeof tasks[i] == 'function')
task = new Task(scope, tasks[i]);
- } else {
+ else
throw new Error('Batch tasks must be functions or Task, Hold or Batch objects');
- }
this.tasks.push(task);
}
}
runTask() {
- if (!(this._currentTaskIndex in this.tasks)) {
+ if (!(this._currentTaskIndex in this.tasks))
return null;
- }
return this.tasks[this._currentTaskIndex].run();
}
process() {
let hold = this.runTask();
- if (hold) {
+ if (hold)
this.hold.acquireUntilAfter(hold);
- }
// Regardless of the state of the just run task,
// fire off the next one, so all the tasks can run
}
// Finally hand out the allocations
- if (bannerAllocation) {
+ if (bannerAllocation)
this._bannerView.allocate(bannerAllocation, flags);
- }
if (authPromptAllocation)
this._authPrompt.allocate(authPromptAllocation, flags);
_resetGreeterProxy() {
if (GLib.getenv('GDM_GREETER_TEST') != '1') {
- if (this._greeter) {
+ if (this._greeter)
this._greeter.run_dispose();
- }
+
this._greeter = this._gdmClient.get_greeter_sync(null);
this._defaultSessionChangedId = this._greeter.connect('default-session-name-changed',
() => {
// If we're just starting out, start on the right item.
- if (!this._userManager.is_loaded) {
+ if (!this._userManager.is_loaded)
this._userList.jumpToItem(loginItem);
- }
},
() => {
// Restart timed login on user interaction
global.stage.connect('captured-event', (actor, event) => {
if (event.type() == Clutter.EventType.KEY_PRESS ||
- event.type() == Clutter.EventType.BUTTON_PRESS) {
+ event.type() == Clutter.EventType.BUTTON_PRESS)
this._startTimedLogin(userName, seconds);
- }
return Clutter.EVENT_PROPAGATE;
});
let users = this._userManager.list_users();
- for (let i = 0; i < users.length; i++) {
+ for (let i = 0; i < users.length; i++)
this._userList.addUser(users[i]);
- }
this._updateDisableUserList();
// if the password service fails, then cancel everything.
// But if, e.g., fingerprint fails, still give
// password authentication a chance to succeed
- if (this.serviceIsForeground(serviceName)) {
+ if (this.serviceIsForeground(serviceName))
this._verificationFailed(true);
- }
}
};
Signals.addSignalMethods(ShellUserVerifier.prototype);
_onEntryKeyPress(entry, event) {
let symbol = event.get_key_symbol();
- if (symbol == Clutter.KEY_Up) {
+ if (symbol == Clutter.KEY_Up)
return this._setPrevItem(entry.get_text());
- } else if (symbol == Clutter.KEY_Down) {
+ else if (symbol == Clutter.KEY_Down)
return this._setNextItem(entry.get_text());
- }
+
return Clutter.EVENT_PROPAGATE;
}
let methods = [];
let expr_, base;
let attrHead = '';
- if (globalCompletionList == null) {
+ if (globalCompletionList == null)
globalCompletionList = [];
- }
let offset = getExpressionOffset(text, text.length - 1);
if (offset >= 0) {
function findMatchingQuote(expr, offset) {
let quoteChar = expr.charAt(offset);
for (let i = offset - 1; i >= 0; --i) {
- if (expr.charAt(i) == quoteChar && expr.charAt(i - 1) != '\\') {
+ if (expr.charAt(i) == quoteChar && expr.charAt(i - 1) != '\\')
return i;
- }
}
return -1;
}
// Given the ending position of a regex, find where it starts
function findMatchingSlash(expr, offset) {
for (let i = offset - 1; i >= 0; --i) {
- if (expr.charAt(i) == '/' && expr.charAt(i - 1) != '\\') {
+ if (expr.charAt(i) == '/' && expr.charAt(i - 1) != '\\')
return i;
- }
}
return -1;
}
while (offset >= 0) {
let currChar = expr.charAt(offset);
- if (isStopChar(currChar)) {
+ if (isStopChar(currChar))
return offset + 1;
- }
- if (currChar.match(/[)\]]/)) {
+ if (currChar.match(/[)\]]/))
offset = findMatchingBrace(expr, offset);
- }
--offset;
}
// To get all properties (enumerable and not), we need to walk
// the prototype chain ourselves
function getAllProps(obj) {
- if (obj === null || obj === undefined) {
+ if (obj === null || obj === undefined)
return [];
- }
+
return Object.getOwnPropertyNames(obj).concat( getAllProps(Object.getPrototypeOf(obj)) );
}
_onNameAppeared() {
this._managerProxy.GetManagedObjectsRemote((result, error) => {
if (!result) {
- if (error) {
+ if (error)
logError(error, `could not get remote objects for service ${this._serviceName} path ${this._managerPath}`);
- }
this._tryToCompleteLoad();
return;
if ('IsInserted' in properties.deep_unpack()) {
this._updateToken(token);
- if (token.IsInserted) {
+ if (token.IsInserted)
this.emit('smartcard-inserted', token);
- } else {
+ else
this.emit('smartcard-removed', token);
- }
}
});
}
function script_afterShowHide(_time) {
- if (overviewShowCount == 1) {
+ if (overviewShowCount == 1)
METRICS.usedAfterOverview.value = mallocUsedSize;
- } else {
+ else
METRICS.leakedAfterOverview.value = mallocUsedSize - METRICS.usedAfterOverview.value;
- }
}
function malloc_usedSize(time, bytes) {
_setIconSize() {
let j = 0;
- while (this._items.length > 1 && this._items[j].style_class != 'item-box') {
+ while (this._items.length > 1 && this._items[j].style_class != 'item-box')
j++;
- }
+
let themeNode = this._items[j].get_theme_node();
this._list.ensure_style();
// If a category is present in all apps, its counter will
// reach appInfos.length
if (category.length > 0 &&
- categoryCounter[category] == appInfos.length) {
+ categoryCounter[category] == appInfos.length)
categories.push(category);
- }
}
return categories;
}, commonCategories);
// Within the grid boundaries, or already animating
if (dragEvent.y > gridY && dragEvent.y < gridBottom ||
- this._adjustment.get_transition('value') != null) {
+ this._adjustment.get_transition('value') != null)
return;
- }
// Moving above the grid
let currentY = this._adjustment.value;
// Moving below the grid
let maxY = this._adjustment.upper - this._adjustment.page_size;
- if (dragEvent.y >= gridBottom && currentY < maxY) {
+ if (dragEvent.y >= gridBottom && currentY < maxY)
this.goToPage(this._grid.currentPage + 1);
- }
}
_onDragBegin() {
}
activateWindow(metaWindow) {
- if (metaWindow) {
+ if (metaWindow)
Main.activateWindow(metaWindow);
- } else {
+ else
Main.overview.hide();
- }
}
_onMenuPoppedDown() {
let i;
let keys = Object.keys(this._fileWatches);
- for (i = 0; i < keys.length; i++) {
+ for (i = 0; i < keys.length; i++)
this._cache.disconnect(this._fileWatches[keys[i]]);
- }
+
this._fileWatches = null;
if (this._timezoneChangedId != 0)
let [absX, absY] = this.get_transformed_position();
if (this._arrowSide == St.Side.TOP ||
- this._arrowSide == St.Side.BOTTOM) {
+ this._arrowSide == St.Side.BOTTOM)
this._arrowOrigin = sourceX - absX + sourceWidth / 2;
- } else {
+ else
this._arrowOrigin = sourceY - absY + sourceHeight / 2;
- }
}
let borderWidth = themeNode.get_length('-arrow-border-width');
let [width, height] = area.get_surface_size();
let [boxWidth, boxHeight] = [width, height];
- if (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM) {
+ if (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)
boxHeight -= rise;
- } else {
+ else
boxWidth -= rise;
- }
+
let cr = area.get_context();
// Translate so that box goes from 0,0 to boxWidth,boxHeight,
// with the arrow poking out of that
- if (this._arrowSide == St.Side.TOP) {
+ if (this._arrowSide == St.Side.TOP)
cr.translate(0, rise);
- } else if (this._arrowSide == St.Side.LEFT) {
+ else if (this._arrowSide == St.Side.LEFT)
cr.translate(rise, 0);
- }
let [x1, y1] = [halfBorder, halfBorder];
let [x2, y2] = [boxWidth - halfBorder, boxHeight - halfBorder];
for (let n = 0; n < this._events.length; n++) {
let event = this._events[n];
- if (_dateIntervalsOverlap (event.date, event.end, begin, end)) {
+ if (_dateIntervalsOverlap(event.date, event.end, begin, end))
result.push(event);
- }
}
result.sort((event1, event2) => {
// sort events by end time on ending day
_InhibitorsChanged(_object, _senderName, [_inhibitor]) {
this._session.IsInhibitedRemote(GNOME_SESSION_AUTOMOUNT_INHIBIT,
(result, error) => {
- if (!error) {
+ if (!error)
this._inhibited = result[0];
- }
});
}
let success = false;
let app = null;
- if (setting == AutorunSetting.RUN) {
+ if (setting == AutorunSetting.RUN)
app = Gio.app_info_get_default_for_type(contentTypes[0], false);
- } else if (setting == AutorunSetting.FILES) {
+ else if (setting == AutorunSetting.FILES)
app = Gio.app_info_get_default_for_type('inode/directory', false);
- }
if (app)
success = startAppForMount(app, mount);
getIcon() {
let file = this._contact.get_avatar_file();
- if (file) {
+ if (file)
return new Gio.FileIcon({ file: file });
- } else {
+ else
return new Gio.ThemedIcon({ name: 'avatar-default' });
- }
}
getSecondaryIcon() {
var DASH_ITEM_HOVER_TIMEOUT = 300;
function getAppFromSource(source) {
- if (source instanceof AppDisplay.AppIcon) {
+ if (source instanceof AppDisplay.AppIcon)
return source.app;
- } else {
+ else
return null;
- }
}
var DashIcon = GObject.registerClass(
if (!this._shownInitially)
this._shownInitially = true;
- for (let i = 0; i < addedItems.length; i++) {
+ for (let i = 0; i < addedItems.length; i++)
addedItems[i].item.show(animate);
- }
// Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=692744
// Without it, StBoxLayout may use a stale size cache
let app = getAppFromSource(source);
// Don't allow favoriting of transient apps
- if (app == null || app.is_window_backed()) {
+ if (app == null || app.is_window_backed())
return false;
- }
if (!global.settings.is_writable('favorite-apps'))
return false;
_sessionUpdated() {
let eventSource;
let showEvents = Main.sessionMode.showCalendarEvents;
- if (showEvents) {
+ if (showEvents)
eventSource = this._getEventSource();
- } else {
+ else
eventSource = new Calendar.EmptyEventSource();
- }
+
this._setEventSource(eventSource);
// Displays are not actually expected to launch Settings when activated
} else if (event.type() == Clutter.EventType.MOTION ||
(event.type() == Clutter.EventType.TOUCH_UPDATE &&
global.display.is_pointer_emulating_sequence(event.get_event_sequence()))) {
- if (this._dragActor && this._dragState == DragState.DRAGGING) {
+ if (this._dragActor && this._dragState == DragState.DRAGGING)
return this._updateDragPosition(event);
- } else if (this._dragActor == null && this._dragState != DragState.CANCELLED) {
+ else if (this._dragActor == null && this._dragState != DragState.CANCELLED)
return this._maybeStartDrag(event);
- }
+
// We intercept KEY_PRESS event so that we can process Esc key press to cancel
// dragging and ignore all other key presses.
} else if (event.type() == Clutter.EventType.KEY_PRESS && this._dragState == DragState.DRAGGING) {
createExtensionObject(uuid, dir, type) {
let metadataFile = dir.get_child('metadata.json');
- if (!metadataFile.query_exists(null)) {
+ if (!metadataFile.query_exists(null))
throw new Error('Missing metadata.json');
- }
let metadataContents, success_;
try {
let requiredProperties = ['uuid', 'name', 'description', 'shell-version'];
for (let i = 0; i < requiredProperties.length; i++) {
let prop = requiredProperties[i];
- if (!meta[prop]) {
+ if (!meta[prop])
throw new Error(`missing "${prop}" property in metadata.json`);
- }
}
- if (uuid != meta.uuid) {
+ if (uuid != meta.uuid)
throw new Error(`uuid "${meta.uuid}" from metadata.json does not match directory name "${uuid}"`);
- }
let extension = {
metadata: meta,
this._updateIconSizesLaterId = 0;
let scale = Math.min(this._fixedHItemSize, this._fixedVItemSize) / Math.max(this._hItemSize, this._vItemSize);
let newIconSize = Math.floor(ICON_SIZE * scale);
- for (let i in this._items) {
+ for (let i in this._items)
this._items[i].icon.setIconSize(newIconSize);
- }
+
return GLib.SOURCE_REMOVE;
}
});
children[i].show();
columnIndex++;
- if (columnIndex == nColumns) {
+ if (columnIndex == nColumns)
columnIndex = 0;
- }
+
if (columnIndex == 0) {
y += this._getVItemSize() + spacing;
if ((i + 1) % this._childrenPerPage == 0)
_press(key) {
this.emit('activated');
- if (key != this.key || this._extended_keys.length == 0) {
+ if (key != this.key || this._extended_keys.length == 0)
this.emit('pressed', this._getKeyval(key), key);
- }
if (key == this.key) {
this._pressTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
}
_processCompletionRequest(event) {
- if (event.completions.length == 0) {
+ if (event.completions.length == 0)
return;
- }
+
// Unique match = go ahead and complete; multiple matches + single tab = complete the common starting string;
// multiple matches + double tab = emit a suggest event with all possible options
if (event.completions.length == 1) {
_entryKeyPressEvent(actor, event) {
let cursorPos = this._entry.clutter_text.get_cursor_position();
let text = this._entry.get_text();
- if (cursorPos != -1) {
+ if (cursorPos != -1)
text = text.slice(0, cursorPos);
- }
- if (event.get_key_symbol() === Clutter.KEY_Tab) {
+
+ if (event.get_key_symbol() == Clutter.KEY_Tab) {
let [completions, attrHead] = JsParse.getCompletions(text, commandHeader, AUTO_COMPLETE_GLOBAL_KEYWORDS);
let currTime = global.get_current_time();
if ((currTime - this._lastTabTime) < AUTO_COMPLETE_DOUBLE_TAB_DELAY) {
nextTab() {
let nextIndex = this._selectedIndex;
- if (nextIndex < this._tabs.length - 1) {
+ if (nextIndex < this._tabs.length - 1)
++nextIndex;
- }
this.selectIndex(nextIndex);
}
prevTab() {
let prevIndex = this._selectedIndex;
- if (prevIndex > 0) {
+ if (prevIndex > 0)
--prevIndex;
- }
this.selectIndex(prevIndex);
}
hbox.add(button);
if (typeof obj == typeof {}) {
let properties = [];
- for (let propName in obj) {
+ for (let propName in obj)
properties.push(propName);
- }
properties.sort();
for (let i = 0; i < properties.length; i++) {
// Handle key events which are relevant for all tabs of the LookingGlass
vfunc_key_press_event(keyPressEvent) {
let symbol = keyPressEvent.keyval;
- if (symbol === Clutter.KEY_Escape) {
- if (this._objInspector.visible) {
+ if (symbol == Clutter.KEY_Escape) {
+ if (this._objInspector.visible)
this._objInspector.close();
- } else {
+ else
this.close();
- }
return Clutter.EVENT_STOP;
}
// Ctrl+PgUp and Ctrl+PgDown switches tabs in the notebook view
if (keyPressEvent.modifier_state & Clutter.ModifierType.CONTROL_MASK) {
- if (symbol == Clutter.KEY_Page_Up) {
+ if (symbol == Clutter.KEY_Page_Up)
this._notebook.prevTab();
- } else if (symbol == Clutter.KEY_Page_Down) {
+ else if (symbol == Clutter.KEY_Page_Down)
this._notebook.nextTab();
- }
}
return Clutter.EVENT_PROPAGATE;
}
_updateLensMode() {
// Applies only to the first zoom region.
- if (this._zoomRegions.length) {
+ if (this._zoomRegions.length)
this._zoomRegions[0].setLensMode(this._settings.get_boolean(LENS_MODE_KEY));
- }
}
_updateClampMode() {
// If the crossHairs is not already within a larger container, add it
// to this zoom region. Otherwise, add a clone.
- if (crossHairs && this.isActive()) {
+ if (crossHairs && this.isActive())
this._crossHairsActor = crossHairs.addToZoomRegion(this, this._mouseActor);
- }
}
/**
let xMouse = this._magnifier.xMouse;
let yMouse = this._magnifier.yMouse;
- if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.PROPORTIONAL) {
+ if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.PROPORTIONAL)
return this._centerFromPointProportional(xMouse, yMouse);
- } else if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.PUSH) {
+ else if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.PUSH)
return this._centerFromPointPush(xMouse, yMouse);
- } else if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.CENTERED) {
+ else if (this._mouseTrackingMode == GDesktopEnums.MagnifierMouseTrackingMode.CENTERED)
return this._centerFromPointCentered(xMouse, yMouse);
- }
return null; // Should never be hit
}
}
layoutManager.connect('startup-complete', () => {
- if (actionMode == Shell.ActionMode.NONE) {
+ if (actionMode == Shell.ActionMode.NONE)
actionMode = Shell.ActionMode.NORMAL;
- }
- if (screenShield) {
+
+ if (screenShield)
screenShield.lockIfWasLocked();
- }
+
if (sessionMode.currentMode != 'gdm' &&
sessionMode.currentMode != 'initial-setup') {
GLib.log_structured(LOG_DOMAIN, GLib.LogLevelFlags.LEVEL_MESSAGE, {
}
function createLookingGlass() {
- if (lookingGlass == null) {
+ if (lookingGlass == null)
lookingGlass = new LookingGlass.LookingGlass();
- }
+
return lookingGlass;
}
function openRunDialog() {
- if (runDialog == null) {
+ if (runDialog == null)
runDialog = new RunDialog.RunDialog();
- }
+
runDialog.open();
}
notification.acknowledged = false;
this.pushNotification(notification);
- if (this.policy.showBanners || notification.urgency == Urgency.CRITICAL) {
+ if (this.policy.showBanners || notification.urgency == Urgency.CRITICAL)
this.emit('notification-show', notification);
- } else {
+ else
notification.playSound();
- }
}
notify(propName) {
let translation = this._getTranslation();
let shouldShow = (this._getSlide() > 0);
- if (shouldShow) {
+ if (shouldShow)
translationStart = translation;
- } else {
+ else
translationEnd = translation;
- }
if (this.layout.translation_x == translationEnd)
return;
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
this.add_child(this._indicators);
- if (Config.HAVE_NETWORKMANAGER) {
+ if (Config.HAVE_NETWORKMANAGER)
this._network = new imports.ui.status.network.NMApplet();
- } else {
+ else
this._network = null;
- }
- if (Config.HAVE_BLUETOOTH) {
+
+ if (Config.HAVE_BLUETOOTH)
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
- } else {
+ else
this._bluetooth = null;
- }
this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
this._power = new imports.ui.status.power.Indicator();
this._indicators.add_child(this._screencast);
this._indicators.add_child(this._location);
this._indicators.add_child(this._nightLight);
- if (this._network) {
+ if (this._network)
this._indicators.add_child(this._network);
- }
- if (this._bluetooth) {
+ if (this._bluetooth)
this._indicators.add_child(this._bluetooth);
- }
this._indicators.add_child(this._remoteAccess);
this._indicators.add_child(this._rfkill);
this._indicators.add_child(this._volume);
this.menu.addMenuItem(this._volume.menu);
this.menu.addMenuItem(this._brightness.menu);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- if (this._network) {
+ if (this._network)
this.menu.addMenuItem(this._network.menu);
- }
- if (this._bluetooth) {
+
+ if (this._bluetooth)
this.menu.addMenuItem(this._bluetooth.menu);
- }
+
this.menu.addMenuItem(this._remoteAccess.menu);
this.menu.addMenuItem(this._location.menu);
this.menu.addMenuItem(this._rfkill.menu);
}
_getCompletion(text) {
- if (text.includes('/')) {
+ if (text.includes('/'))
return this._pathCompleter.get_completion_suffix(text);
- } else {
+ else
return this._getCommandCompletion(text);
- }
}
_run(input, inTerminal) {
}
let items = this._sources.entries();
- for (let [source, obj] of items) {
+ for (let [source, obj] of items)
this._removeSource(source, obj);
- }
}
_updateVisibility() {
}
_showSource(source, obj, box) {
- if (obj.detailed) {
+ if (obj.detailed)
[obj.titleLabel, obj.countLabel] = this._makeNotificationDetailedSource(source, box);
- } else {
+ else
[obj.titleLabel, obj.countLabel] = this._makeNotificationSource(source, box);
- }
box.visible = obj.visible && (source.unseenCount > 0);
}
this._lockScreenScrollCounter += delta;
// 7 standard scrolls to lift up
- if (this._lockScreenScrollCounter > 35) {
+ if (this._lockScreenScrollCounter > 35)
this._liftShield(true, 0);
- }
return Clutter.EVENT_STOP;
}
// An icon for, or thumbnail of, content
let icon = this.metaInfo['createIcon'](this.ICON_SIZE);
- if (icon) {
+ if (icon)
titleBox.add(icon);
- }
let title = new St.Label({
text: this.metaInfo['name'],
this._statusBin.visible = !haveResults;
if (!haveResults) {
- if (this.searchInProgress) {
+ if (this.searchInProgress)
this._statusText.set_text(_("Searching…"));
- } else {
+ else
this._statusText.set_text(_("No results."));
- }
}
}
if the reason is no secrets, as that indicates the user
cancelled the agent dialog */
if (newstate == NM.DeviceState.FAILED &&
- reason != NM.DeviceStateReason.NO_SECRETS) {
+ reason != NM.DeviceStateReason.NO_SECRETS)
this.emit('activation-failed', reason);
- }
this._sync();
}
_checkConnections(network, accessPoint) {
this._connections.forEach(connection => {
if (accessPoint.connection_valid(connection) &&
- !network.connections.includes(connection)) {
+ !network.connections.includes(connection))
network.connections.push(connection);
- }
});
}
if the reason is no secrets, as that indicates the user
cancelled the agent dialog */
if (newstate == NM.DeviceState.FAILED &&
- reason != NM.DeviceStateReason.NO_SECRETS) {
+ reason != NM.DeviceStateReason.NO_SECRETS)
this.emit('activation-failed', reason);
- }
this._sync();
}
setActiveConnections(vpnConnections) {
let connections = this._connectionItems.values();
- for (let item of connections) {
+ for (let item of connections)
item.setActiveConnection(null);
- }
+
vpnConnections.forEach(a => {
if (a.connection) {
let item = this._connectionItems.get(a.connection.get_uuid());
}
set stream(stream) {
- if (this._stream) {
+ if (this._stream)
this._disconnectStream(this._stream);
- }
this._stream = stream;
for (let i = 0; i < this.get_n_current_points(); i++) {
let x, y;
- if (motion == true) {
+ if (motion == true)
[x, y] = this.get_motion_coords(i);
- } else {
+ else
[x, y] = this.get_press_coords(i);
- }
if (i == 0) {
minX = maxX = x;
this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session, GSD_WACOM_BUS_NAME,
GSD_WACOM_OBJECT_PATH,
(proxy, error) => {
- if (error) {
+ if (error)
log(error.message);
- }
});
global.display.connect('pad-mode-switch', (display, pad, group, mode) => {
_lookupIndex(windows, metaWindow) {
for (let i = 0; i < windows.length; i++) {
- if (windows[i].metaWindow == metaWindow) {
+ if (windows[i].metaWindow == metaWindow)
return i;
- }
}
return -1;
}
}
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
- if (monitorIndex == this.monitorIndex) {
+ if (monitorIndex == this.monitorIndex)
this._doAddWindow(metaWin);
- }
}
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
- if (monitorIndex == this.monitorIndex) {
+ if (monitorIndex == this.monitorIndex)
this._doRemoveWindow(metaWin);
- }
}
// check for maximized windows on the workspace
this._allWindows.push(windows[i].meta_window);
this._minimizedChangedIds.push(minimizedChangedId);
- if (this._isMyWindow(windows[i]) && this._isOverviewWindow(windows[i])) {
+ if (this._isMyWindow(windows[i]) && this._isOverviewWindow(windows[i]))
this._addWindowClone(windows[i]);
- }
}
// Track window changes
}
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
- if (monitorIndex == this.monitorIndex) {
+ if (monitorIndex == this.monitorIndex)
this._doAddWindow(metaWin);
- }
}
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
- if (monitorIndex == this.monitorIndex) {
+ if (monitorIndex == this.monitorIndex)
this._doRemoveWindow(metaWin);
- }
}
_updateMinimized(metaWin) {